package com.mohan.service;

import java.util.List;

import com.mohan.bean.ManagerInfo;
import com.mohan.bean.UserListInfo;
import com.mohan.pojo.User;
import com.mohan.util.BetweenUtil;
import com.mohan.util.PageData;
import com.mohan.util.TokenUserInfo;

public interface UserService {
	
	/**
	 * 插入一条用户信息
	 * @param user
	 * @throws Exception 
	 */
	public void insertOneUser(User user) throws Exception;
	
	/**
	 * 根据userId和userPwd获取用户信息
	 * @param user
	 * @return
	 */
	public User getUserByUserIdAndUserPwd(User user);
	
	/**
	 * 生成token并且存入静态Map，为后面的验证做准备
	 * @param userId
	 * @return
	 */
	public int dealLogin(String userId,TokenUserInfo tokenUserInfo);
	
	/**
	 * 查询userId是否引进存在于数据库中
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public Integer userIdIsExist(String userId) throws Exception;
	
	/**
	 * 根据role获取记录的总条数
	 * @return
	 * @throws Exception
	 */
	public Integer getRecordSizeByRole(BetweenUtil role) throws Exception;
	
	/**
	 * 分页查询用户列表
	 * @param uListInfo
	 * @return
	 * @throws Exception
	 */
	public List<PageData> getRecordByRole(BetweenUtil role) throws Exception;
	
	/**
	 * 根据userId获取用户信息
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public User getUserByUserId(String userId) throws Exception;
	
	/**
	 * 根据userId更改用户信息
	 * @param user
	 * @throws Exception
	 */
	public void updateUserInfoByUserId(User user) throws Exception;
	
	/**
	 * 根据userId更改用户信息
	 * @param user
	 * @throws Exception
	 */
	public void updateWxUserByUserId(User user) throws Exception;
	
	/**
	 * 更改用户status
	 * @param user
	 */
	public void updateUserStatusByUserId(User user) throws Exception;
	
	/**
	 * 根据userId删除用户信息
	 * @param userId
	 * @throws Exception
	 */
	public void deleteUserByUserId(String userId) throws Exception;
}
